import request from '@/utils/request'

// 查询聊天室列表
export function listRoom(query) {
  return request({
    url: '/scoketChatRoom/room/list',
    method: 'get',
    params: query
  })
}

// 查询聊天室详细
export function getRoom(query) {
  return request({
    url: '/scoketChatRoom/meg/list',
    method: 'get',
    params: query

  })
}

// 新增聊天室
export function addRoom(data) {
  return request({
    url: '/scoketChatRoom/room',
    method: 'post',
    data: data
  })
}

// 修改聊天室
export function updateRoom(data) {
  return request({
    url: '/scoketChatRoom/room',
    method: 'put',
    data: data
  })
}

// 删除聊天室
export function delRoom(chatRoomId) {
  return request({
    url: '/scoketChatRoom/room/' + chatRoomId,
    method: 'delete'
  })
}

// 导出聊天室
export function exportRoom(query) {
  return request({
    url: '/scoketChatRoom/room/export',
    method: 'get',
    params: query
  })
}
